home *** CD-ROM | disk | FTP | other *** search
- IFND SOUND_SOUND_I
- SOUND_SOUND_I SET 1
-
- **
- ** $VER: sound.i V0.9B
- **
- ** Sound Definitions.
- **
- ** (C) Copyright 1996-1997 DreamWorld Productions.
- ** All Rights Reserved
- **
-
- IFND DPKERNEL_I
- include 'games/dpkernel.i'
- ENDC
-
- *****************************************************************************
- * Module definitions.
-
- Snd_ModVersion = 0
- Snd_ModRevision = 9
-
- *****************************************************************************
- * Sound object.
-
- SNDVERSION = 1
- TAGS_SOUND = (ID_SPCTAGS<<16)|ID_SOUND
-
- STRUCTURE SND,HEAD_SIZEOF
- WORD SND_LastChannel ;Channel.
- WORD SND_Priority ;Priority.
- APTR SND_Header ;Sample info header, if any.
- APTR SND_Data ;Address of sample data.
- LONG SND_Length ;Length of sample data in bytes.
- WORD SND_Octave ;Octave/Note setting.
- WORD SND_Volume ;Volume of sample (1 - 100).
- LONG SND_Attrib ;Sound attributes.
- APTR SND_Source ;Where the sound comes from.
- LONG SND_Frequency ;Frequency of sampled sound.
-
- *** Private fields start now ***
-
- BYTE SND_AFlags ;Private.
- BYTE SND_Pad ;Private.
-
- * Sound Tags.
-
- SA_Priority = SND_Priority|TWORD
- SA_Header = SND_Header|TLONG
- SA_Data = SND_Data|TLONG
- SA_Length = SND_Length|TLONG
- SA_Octave = SND_Octave|TWORD
- SA_Volume = SND_Volume|TWORD
- SA_Attrib = SND_Attrib|TLONG
- SA_Source = SND_Source|TLONG
- SA_Frequency = SND_Frequency|TLONG
-
- *** Flags for SND_Attrib.
-
- ;B_SBIT16 = 0
- B_SMODVOL = 1
- B_SMODPER = 2
- B_SREPEAT = 3
- B_SEMPTY = 4
- B_SLEFT = 5
- B_SRIGHT = 6
- B_SFORCE = 7
- B_SSTOPLAST = 8
-
- ;SBIT8 = 0 ;Sound data is 8 bit.
- ;SBIT16 = 1<<B_SBIT16 ;Sound data is 16 bit.
- SMODVOL = 1<<B_SMODVOL ;Modulate volume with next channel.
- SMODPER = 1<<B_SMODPER ;Modulate period with next channel.
- SREPEAT = 1<<B_SREPEAT ;Repeat sample forever.
- SEMPTY = 1<<B_SEMPTY ;Only play if a channel is empty.
- SLEFT = 1<<B_SLEFT ;Preferably play through left speaker.
- SRIGHT = 1<<B_SRIGHT ;Preferably play through right speaker.
- SFORCE = 1<<B_SFORCE ;Only play through selected speaker.
- SSTOPLAST = 1<<B_SSTOPLAST ;Only play through specified channel.
-
- *****************************************************************************
- * Octave definitions for SND_Octave. An 'S' at the end of an octave
- * definition indicates a sharp note. The comments on the right tell
- * you the period resulting from the octant used. This is good if
- * you are converting an old program that programmed the periods
- * directly.
-
- OCT_G0S = 0 ;068
- OCT_G0 = 2 ;072
- OCT_F0S = 4 ;076
- OCT_F0 = 6 ;080
- OCT_E0 = 8 ;085
- OCT_D0S = 10 ;090
- OCT_D0 = 12 ;095
- OCT_C0S = 14 ;101
- OCT_C0 = 16 ;107
- OCT_B0 = 18 ;113
- OCT_A0S = 20 ;120
- OCT_A0 = 22 ;127
-
- OCT_G1S = 24 ;135
- OCT_G1 = 26 ;143
- OCT_F1S = 28 ;151
- OCT_F1 = 30 ;160
- OCT_E1 = 32 ;170
- OCT_D1S = 34 ;180
- OCT_D1 = 36 ;190
- OCT_C1S = 38 ;202
- OCT_C1 = 40 ;214
- OCT_B1 = 42 ;226
- OCT_A1S = 44 ;240
- OCT_A1 = 46 ;254
-
- OCT_G2S = 48 ;269
- OCT_G2 = 50 ;285
- OCT_F2S = 52 ;302
- OCT_F2 = 54 ;320
- OCT_E2 = 56 ;339
- OCT_D2S = 58 ;360
- OCT_D2 = 60 ;381
- OCT_C2S = 62 ;404
- OCT_C2 = 64 ;428
- OCT_B2 = 66 ;453
- OCT_A2S = 68 ;480
- OCT_A2 = 70 ;508
-
- OCT_G3S = 72 ;538
- OCT_G3 = 74 ;570
- OCT_F3S = 76 ;604
- OCT_F3 = 78 ;640
- OCT_E3 = 80 ;678
- OCT_D3S = 82 ;720
- OCT_D3 = 84 ;762
- OCT_C3S = 86 ;808
- OCT_C3 = 88 ;856
- OCT_B3 = 90 ;906
- OCT_A3S = 92 ;960
- OCT_A3 = 94 ;1016
-
- OCT_G4S = 96 ;1076
- OCT_G4 = 98 ;1140
- OCT_F4S = 100 ;1208
- OCT_F4 = 102 ;1280
- OCT_E4 = 104 ;1356
- OCT_D4S = 106 ;1440
- OCT_D4 = 108 ;1524
- OCT_C4S = 110 ;1616
- OCT_C4 = 112 ;1712
- OCT_B4 = 114 ;1812
- OCT_A4S = 116 ;1920
- OCT_A4 = 118 ;2032
-
- OCT_G5S = 120 ;2152
- OCT_G5 = 122 ;2280
- OCT_F5S = 124 ;2416
- OCT_F5 = 126 ;2560
- OCT_E5 = 128 ;2712
- OCT_D5S = 130 ;2880
- OCT_D5 = 132 ;3048
- OCT_C5S = 134 ;3232
- OCT_C5 = 136 ;3424
- OCT_B5 = 138 ;3624
- OCT_A5S = 140 ;3840
- OCT_A5 = 142 ;4064
-
- OCT_G6S = 144 ;4304
- OCT_G6 = 146 ;4560
- OCT_F6S = 148 ;4832
- OCT_F6 = 150 ;5120
- OCT_E6 = 152 ;5424
- OCT_D6S = 154 ;5760
- OCT_D6 = 156 ;6096
- OCT_C6S = 158 ;6464
- OCT_C6 = 160 ;6848
- OCT_B6 = 162 ;7248
- OCT_A6S = 164 ;7680
- OCT_A6 = 166 ;8128
-
- OCT_G7S = 168 ;8608
- OCT_G7 = 170 ;9120
- OCT_F7S = 172 ;9664
- OCT_F7 = 174 ;10240
- OCT_E7 = 176 ;10848
- OCT_D7S = 178 ;11520
- OCT_D7 = 180 ;12192
- OCT_C7S = 182 ;12928
- OCT_C7 = 184 ;13696
- OCT_B7 = 186 ;14496
- OCT_A7S = 188 ;15360
-
- ENDC ;SOUND_SOUND_I
-